package kafka010;

import org.apache.kafka.common.serialization.Serializer;
import org.apache.tomcat.util.security.MD5Encoder;

import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.Map;

public class DemoSerializer implements Serializer<String> {
    @Override
    public void configure(Map<String, ?> configs, boolean isKey) {

    }

    @Override
    public byte[] serialize(String topic, String data) {
        String result = data + "abd";
        return result.getBytes(StandardCharsets.UTF_8);
    }

    @Override
    public void close() {

    }
}
